package com.zy.recursion;

/**
 * Created by zhaoyi on 2019/8/27.
 * 翻转打印字符串
 */
public class ReversePrint {

    private char [] str;

    public ReversePrint(char[] str) {
        this.str = str;
    }

    public void print(int index){
        if(index < str.length-1){
            print(index+1);
        }
        System.out.print(str[index] + " ");
    }

}
